package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc TargetTempDto
 * @使用场景
 */
@Data
public class TargetTempDto extends BaseDto implements Serializable {

    /**
     * 指标模板ID
     */
    @ApiModelProperty("指标模板ID")
    private String objectiveTemplateId;

    /**
     * 指标模板类型 QUALITATIVE:定性 RATION:定量
     */
    @ApiModelProperty("指标模板类型")
    private String objectiveTemplateType;

    /**
     * 是否有目标值 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否有目标值")
    private String isTargetValue;

    /**
     * 指标业务类型 NUMBER_GROWTH:数量增长型 NUMBER_DECLINE:数量降幅型 PERCENTAGE_GROWTH:百分比增长型 PERCENTAGE_DECLINE:百分比降幅型 PROGRESS:进度型 RATIO_GROWTH:比率增长型 RATIO_DECLINE:比率降幅型 SUBJECTIVE_QUALITATIVE:主观定性
     */
    @ApiModelProperty("指标业务类型")
    private String objectiveValueType;

    /**
     * 是否左侧比例型 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否左侧比例型")
    private String isLeft;

    /**
     * 是否用于评价模板 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否用于评价模板")
    private String isUseevaluationTemplate;

    /**
     * 单位 INDIVIDUAL:个 DOOR:门 TERM:项 PIECE:篇 YUAN:元 FEN:分 WAN_YUAN:万元 PERCENT:百分率 SET:套 TIMES:次 PART:部 NNT:人
     */
    @ApiModelProperty("单位")
    private String unit;

    /**
     * 目标值数据源 MANUAL_FILLING:人工填报 SYSTEM_DOCKING:外部系统对接
     */
    @ApiModelProperty("目标值数据源")
    private String objectiveValueSource;

    /**
     * 是否结果指标 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否结果指标")
    private String isResultIndicator;

    /**
     * 指标模板编号
     */
    @ApiModelProperty("指标模板编号")
    private String objectiveTemplateNumber;

    /**
     * 指标模板名称
     */
    @ApiModelProperty("指标模板名称")
    private String objectiveTemplateName;

    /**
     * 临时锁定 TRUE:是 FALSE:否
     */
    @ApiModelProperty("临时锁定")
    private String isTemporaryLock;

    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @ApiModelProperty("主体生命周期")
    private String subjectLifeCycle;

    /**
     * 是否推荐 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否推荐")
    private String isRecommend;

    /**
     * 对接申请状态 NOT_APPLY:未申请 BEING_PROCESSED:处理中 PROCESSED:已处理
     */
    @ApiModelProperty("对接申请状态")
    private String applyStatus;

    /**
     * 系统对接方式 INTERFACE_DOCKING:接口对接 ACHIEVEMENT_DOCKING:成果对接
     */
    @ApiModelProperty("系统对接方式")
    private String systemDockingType;

    /**
     * 简介
     */
    @ApiModelProperty("简介")
    private String objectiveTemplateDesc;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String remark;

    /**
     * 示例描述
     */
    @ApiModelProperty("示例描述")
    private String objectiveTemplate;

    /**
     * 操作人就职记录ID
     */
    @ApiModelProperty("操作人就职记录ID")
    private String operationInductionId;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    /**
     * 数字单位
     */
    @ApiModelProperty("数字单位")
    private Double digitalUnit;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TargetTempDto that = (TargetTempDto) o;
        return (
                objectiveTemplateId == that.objectiveTemplateId &&
                        objectiveTemplateType == that.objectiveTemplateType &&
                        isTargetValue == that.isTargetValue &&
                        objectiveValueType == that.objectiveValueType &&
                        isLeft == that.isLeft &&
                        isUseevaluationTemplate == that.isUseevaluationTemplate &&
                        unit == that.unit &&
                        objectiveValueSource == that.objectiveValueSource &&
                        isResultIndicator == that.isResultIndicator &&
                        objectiveTemplateNumber == that.objectiveTemplateNumber &&
                        objectiveTemplateName == that.objectiveTemplateName &&
                        isTemporaryLock == that.isTemporaryLock &&
                        subjectLifeCycle == that.subjectLifeCycle &&
                        isRecommend == that.isRecommend &&
                        applyStatus == that.applyStatus &&
                        systemDockingType == that.systemDockingType &&
                        objectiveTemplateDesc == that.objectiveTemplateDesc &&
                        remark == that.remark &&
                        objectiveTemplate == that.objectiveTemplate &&
                        operationInductionId == that.operationInductionId &&
                        operateTime == that.operateTime &&
                        digitalUnit == that.digitalUnit
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                objectiveTemplateId,
                objectiveTemplateType,
                isTargetValue,
                objectiveValueType,
                isLeft,
                isUseevaluationTemplate,
                unit,
                objectiveValueSource,
                isResultIndicator,
                objectiveTemplateNumber,
                objectiveTemplateName,
                isTemporaryLock,
                subjectLifeCycle,
                isRecommend,
                applyStatus,
                systemDockingType,
                objectiveTemplateDesc,
                remark,
                objectiveTemplate,
                operationInductionId,
                operateTime,
                digitalUnit
        );
    }

}
